<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/react.min.js"></script>
    <script src="js/react-dom.min.js"></script>
</head>
<body>
<div class="app"></div>
</body>
</html>
<script>
    //自定义组件
    var Componet = React.createClass({
       render:function(){
           return React.DOM.div({
                       style:{
                           width:"100%",
                           height:"10rem",
                           background:"#f0f0f0",
                           textAlign:"center",
                           margin:"0",
                           padding:"0"
                       }
                   },
                   React.DOM.p({},
                           React.DOM.span({},
                                   React.DOM.strong({
                                               style:{
                                                   color:"#ffffff",
                                                   textDecoration:"underline"
                                               }
                                           },
                                           "I'm"
                                   ),
                                   React.DOM.em({
                                       style:{
                                           color:"#a7c0dc"
                                       }
                                   },"  so custom")
                           )
                   ));
       }
    });
    ReactDOM.render(
            React.createElement(Componet),
            document.getElementsByClassName("app")[0]
    )
</script>